package net.maku.module.dao;

import net.maku.framework.mybatis.dao.BaseDao;
import net.maku.module.entity.AgCategoryPermission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;

/**
 * 系统用户管理栏目(AgCategoryPermission)表数据库访问层
 *
 * @author ChiHongYu
 * @since 2025-01-08 13:23:13
 */
@Mapper
public interface AgCategoryPermissionDao {


    AgCategoryPermission queryById(Integer id);

    AgCategoryPermission queryByRoleId(long roleId);

    List<String> getCategoryIdsByRoleIds(@Param("list")List<Long> list);

    List<AgCategoryPermission> page(@Param("param") Map<String, Object> param,
                                  @Param("limit1") int limit1,
                                  @Param("limit2") int limit2);


    int count(@Param("param") Map<String, Object> param);


    int insert(AgCategoryPermission agCategoryPermission);


    int update(AgCategoryPermission agCategoryPermission);


    int deleteById(Integer id);


    int changeUseById(Integer id, String useState);

    List<Long> getCategoryIdsByUserId(long userId);

    List<AgCategoryPermission> queryList(Map param);
    void deleteByCategoryId(Map param1);
}
